package com.neusoft.neuiotms.dcvm.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "dcvm_model_version")
public class ModelVersion extends AbstractModel {
    private static final long serialVersionUID = 1L;

    /** 文件地址 */
    @NotNull(message = "文件地址不能为空")
    @Column(length = 255, nullable = false)
    private String fileUrl;

    /** 版本类型 */
    @NotNull(message = "版本类型不能为空")
    @Column(length = 255, nullable = false)
    private String versionCode;

    @NotNull(message = "文件名不能为空")
    @Column(length = 255, nullable = false)
    private String fileName;

    /** 所属模具 */
    @ManyToOne
    private Model model;
}
